package com.example.gulimall.cart.service;


import com.example.gulimall.cart.vo.Cart;
import com.example.gulimall.cart.vo.CartItem;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.ExecutionException;

@Service
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void clearCart(String cartKey);

    void checkItem(Long skuId, Integer check);

    void countItem(Long skuId, Integer count);

    void delItem(Long deleteId);

    List<CartItem> getCurrentCartItems();
}
